<?php
/**
 * File: Address.class.php
 * Author: camy <375766145@qq.com>
 * Time: 2018/3/19 16:36
 */

namespace Common\Service;
class Address extends Base
{
    public function getAddress($id)
    {
        $address = M('region')
            ->where(['parent_id' => intval($id)])
            ->field('id,name')
            ->select();
        return $address;
    }

    public function name($id)
    {
        return M('region')->where(['id' => intval($id)])->getField('name');

    }

}
